<template>
  <div>
    <div class="container radiusBottom">
      <div class="images">
        <div class="img">
          <img :src="styleUrls[dataJson.type][dataJson.stylesType]" />
        </div>
        <div class="buttonSetStyle" @click="alertTag">修改样式</div>
      </div>
    </div>
    <div class="container">
      <div class="line">
        <div class="left ">选择地址</div>
        <el-tooltip
          effect="dark"
          :content="dataJson.addressval.address"
          placement="bottom"
        >
          <el-button @click="dialogMap = true">
            {{
              dataJson.addressval.address ? dataJson.addressval.address : "选择"
            }}
          </el-button>
        </el-tooltip>
      </div>
      <div class="line">
        <div class="left ">联系电话</div>
        <el-input
          v-model="dataJson.Phone"
          type="text"
          placeholder="请输入内容"
          maxlength="11"
          show-word-limit
        >
        </el-input>
      </div>
    </div>
    <Map
      v-if="dialogMap"
      :mapval="dataJson.addressval.address"
      @close="dialogMap = false"
      @addsMap="addsMap"
    />
  </div>
</template>

<script>
import { styleUrls } from "../../data";
export default {
  components: {
    Map: () => import("./toolCom/Map")
  },
  props: {
    dataJson: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {
      styleUrls,
      dialogMap: false
    };
  },
  methods: {
    alertTag() {
      this.$emit("alertTag", true, this.dataJson.stylesType, 31);
    },
    addsMap(e) {
      this.dialogMap = false;
      this.dataJson.addressval = e;
    }
  }
};
</script>
<style lang="scss" scoped>
@import "~@/assets/scss/decorate.scss";
</style>
